
<template>
  <div class="content">
      <div class="tab-list">
          <el-tabs v-model="activeName">
               <el-tab-pane v-for="(item,index) in tabMapOptions" :label="item.label" :key='index' :name="item.key">
                   <keep-alive>
                      <studentCount v-if="activeName==0&&index==0">
                      </studentCount>
                      <teacherCount v-if="activeName==1&&index==1">
                      </teacherCount>
                   </keep-alive>
               </el-tab-pane>
          </el-tabs>
        </div>
    </div>
</template>
<script>
import studentCount from './comps/studentCount';
import teacherCount from './comps/teacherCount';
export default {
    name: 'staAttendanceList',
    components: { studentCount, teacherCount},
    data() {
        return {
            activeName: '0',
            tabMapOptions: [
                { label: '学生考勤统计', key: '0' },
                { label: '教师考勤统计', key: '1' }
            ]
        }
    }
}
</script>
<style lang="scss" scoped>
.content {
    position: relative;
    padding: 0px;
    $bgcolor: #fff;
}
</style>


